
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



CREATE PROCEDURE [dbo].[usp_SearchEmployee]
    (
      @JOL_Employee_Name VARCHAR(50),
      @JOL_Employee_School VARCHAR(50)
    )
AS 
    SELECT  JOL_Employee_Account,
            JOL_Employee_Name,
            JOL_Employee_School,
            JOL_Employee_Profession,
            JOL_Employee_Mobile,
            JOL_Employee_Email,
            JOL_Employee_VerifyStatus,
            JOL_Employee_CredentialsFileLink
    FROM    dbo.JOL_Employee
    WHERE   ( JOL_Employee_Name LIKE '%' + @JOL_Employee_Name + '%' )
            AND ( JOL_Employee_School LIKE '%' + @JOL_Employee_School + '%' )
    ORDER BY JOL_Employee_VerifyStatus DESC,
            JOL_Employee_AddTime DESC,
            JOL_Employee_UpdateTime DESC



GO
